Optimal. Leaf size=88 \[ -\frac {i d^2 \text {Li}_2\left (e^{4 i (a+b x)}\right )}{2 b^3}+\frac {2 d (c+d x) \log \left (1-e^{4 i (a+b x)}\right )}{b^2}-\frac {2 (c+d x)^2 \cot (2 a+2 b x)}{b}-\frac {2 i (c+d x)^2}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.19, antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {4419, 4184, 3717, 2190, 2279, 2391} \[ -\frac {i d^2 \text {PolyLog}\left (2,e^{4 i (a+b x)}\right )}{2 b^3}+\frac {2 d (c+d x) \log \left (1-e^{4 i (a+b x)}\right )}{b^2}-\frac {2 (c+d x)^2 \cot (2 a+2 b x)}{b}-\frac {2 i (c+d x)^2}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2190
Rule 2279
Rule 2391
Rule 3717
Rule 4184
Rule 4419
Rubi steps
\begin {align*} \int (c+d x)^2 \csc ^2(a+b x) \sec ^2(a+b x) \, dx &=4 \int (c+d x)^2 \csc ^2(2 a+2 b x) \, dx\\ &=-\frac {2 (c+d x)^2 \cot (2 a+2 b x)}{b}+\frac {(4 d) \int (c+d x) \cot (2 a+2 b x) \, dx}{b}\\ &=-\frac {2 i (c+d x)^2}{b}-\frac {2 (c+d x)^2 \cot (2 a+2 b x)}{b}-\frac {(8 i d) \int \frac {e^{2 i (2 a+2 b x)} (c+d x)}{1-e^{2 i (2 a+2 b x)}} \, dx}{b}\\ &=-\frac {2 i (c+d x)^2}{b}-\frac {2 (c+d x)^2 \cot (2 a+2 b x)}{b}+\frac {2 d (c+d x) \log \left (1-e^{4 i (a+b x)}\right )}{b^2}-\frac {\left (2 d^2\right ) \int \log \left (1-e^{2 i (2 a+2 b x)}\right ) \, dx}{b^2}\\ &=-\frac {2 i (c+d x)^2}{b}-\frac {2 (c+d x)^2 \cot (2 a+2 b x)}{b}+\frac {2 d (c+d x) \log \left (1-e^{4 i (a+b x)}\right )}{b^2}+\frac {\left (i d^2\right ) \operatorname {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{2 i (2 a+2 b x)}\right )}{2 b^3}\\ &=-\frac {2 i (c+d x)^2}{b}-\frac {2 (c+d x)^2 \cot (2 a+2 b x)}{b}+\frac {2 d (c+d x) \log \left (1-e^{4 i (a+b x)}\right )}{b^2}-\frac {i d^2 \text {Li}_2\left (e^{4 i (a+b x)}\right )}{2 b^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 1.72, size = 277, normalized size = 3.15 \[ \frac {2 b^2 \csc (2 a) \sin (2 b x) (c+d x)^2 \csc (2 (a+b x))-\frac {i e^{4 i a} \left (4 e^{-4 i a} b^2 (c+d x)^2+2 i \left (1-e^{-4 i a}\right ) b d (c+d x) \log \left (1-e^{-i (a+b x)}\right )+2 i \left (1-e^{-4 i a}\right ) b d (c+d x) \log \left (1+e^{-i (a+b x)}\right )+2 i \left (1-e^{-4 i a}\right ) b d (c+d x) \log \left (1+e^{-2 i (a+b x)}\right )-2 \left (1-e^{-4 i a}\right ) d^2 \text {Li}_2\left (-e^{-i (a+b x)}\right )-2 \left (1-e^{-4 i a}\right ) d^2 \text {Li}_2\left (e^{-i (a+b x)}\right )-\left (1-e^{-4 i a}\right ) d^2 \text {Li}_2\left (-e^{-2 i (a+b x)}\right )\right )}{-1+e^{4 i a}}}{b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.56, size = 950, normalized size = 10.80 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )}^{2} \csc \left (b x + a\right )^{2} \sec \left (b x + a\right )^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.12, size = 351, normalized size = 3.99 \[ -\frac {4 i \left (d^{2} x^{2}+2 c d x +c^{2}\right )}{b \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right ) \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )}+\frac {2 d c \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{b^{2}}+\frac {2 d c \ln \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right )}{b^{2}}+\frac {2 d c \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right )}{b^{2}}-\frac {8 d c \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {4 i d^{2} a^{2}}{b^{3}}+\frac {2 d^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x}{b^{2}}-\frac {4 i d^{2} x^{2}}{b}-\frac {i d^{2} \polylog \left (2, -{\mathrm e}^{2 i \left (b x +a \right )}\right )}{b^{3}}+\frac {2 d^{2} \ln \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {2 d^{2} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {2 d^{2} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{3}}-\frac {2 i d^{2} \polylog \left (2, -{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {2 i d^{2} \polylog \left (2, {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {8 i d^{2} a x}{b^{2}}-\frac {2 d^{2} a \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{b^{3}}+\frac {8 d^{2} a \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.69, size = 777, normalized size = 8.83 \[ -\frac {4 \, b^{2} c^{2} + {\left (2 \, b d^{2} x + 2 \, b c d - 2 \, {\left (b d^{2} x + b c d\right )} \cos \left (4 \, b x + 4 \, a\right ) - {\left (2 i \, b d^{2} x + 2 i \, b c d\right )} \sin \left (4 \, b x + 4 \, a\right )\right )} \arctan \left (\sin \left (2 \, b x + 2 \, a\right ), \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) + {\left (2 \, b d^{2} x + 2 \, b c d - 2 \, {\left (b d^{2} x + b c d\right )} \cos \left (4 \, b x + 4 \, a\right ) - {\left (2 i \, b d^{2} x + 2 i \, b c d\right )} \sin \left (4 \, b x + 4 \, a\right )\right )} \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) + 1\right ) - {\left (2 \, b c d \cos \left (4 \, b x + 4 \, a\right ) + 2 i \, b c d \sin \left (4 \, b x + 4 \, a\right ) - 2 \, b c d\right )} \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) - 1\right ) + {\left (2 \, b d^{2} x \cos \left (4 \, b x + 4 \, a\right ) + 2 i \, b d^{2} x \sin \left (4 \, b x + 4 \, a\right ) - 2 \, b d^{2} x\right )} \arctan \left (\sin \left (b x + a\right ), -\cos \left (b x + a\right ) + 1\right ) + 4 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x\right )} \cos \left (4 \, b x + 4 \, a\right ) + {\left (d^{2} \cos \left (4 \, b x + 4 \, a\right ) + i \, d^{2} \sin \left (4 \, b x + 4 \, a\right ) - d^{2}\right )} {\rm Li}_2\left (-e^{\left (2 i \, b x + 2 i \, a\right )}\right ) + 2 \, {\left (d^{2} \cos \left (4 \, b x + 4 \, a\right ) + i \, d^{2} \sin \left (4 \, b x + 4 \, a\right ) - d^{2}\right )} {\rm Li}_2\left (-e^{\left (i \, b x + i \, a\right )}\right ) + 2 \, {\left (d^{2} \cos \left (4 \, b x + 4 \, a\right ) + i \, d^{2} \sin \left (4 \, b x + 4 \, a\right ) - d^{2}\right )} {\rm Li}_2\left (e^{\left (i \, b x + i \, a\right )}\right ) - {\left (i \, b d^{2} x + i \, b c d + {\left (-i \, b d^{2} x - i \, b c d\right )} \cos \left (4 \, b x + 4 \, a\right ) + {\left (b d^{2} x + b c d\right )} \sin \left (4 \, b x + 4 \, a\right )\right )} \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) - {\left (i \, b d^{2} x + i \, b c d + {\left (-i \, b d^{2} x - i \, b c d\right )} \cos \left (4 \, b x + 4 \, a\right ) + {\left (b d^{2} x + b c d\right )} \sin \left (4 \, b x + 4 \, a\right )\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) - {\left (i \, b d^{2} x + i \, b c d + {\left (-i \, b d^{2} x - i \, b c d\right )} \cos \left (4 \, b x + 4 \, a\right ) + {\left (b d^{2} x + b c d\right )} \sin \left (4 \, b x + 4 \, a\right )\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right ) - {\left (-4 i \, b^{2} d^{2} x^{2} - 8 i \, b^{2} c d x\right )} \sin \left (4 \, b x + 4 \, a\right )}{-i \, b^{3} \cos \left (4 \, b x + 4 \, a\right ) + b^{3} \sin \left (4 \, b x + 4 \, a\right ) + i \, b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (c+d\,x\right )}^2}{{\cos \left (a+b\,x\right )}^2\,{\sin \left (a+b\,x\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (c + d x\right )^{2} \csc ^{2}{\left (a + b x \right )} \sec ^{2}{\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________